package com.ndp.fb.walle.helper;

import com.ndp.fb.config.ConfigCentre;
import com.ndp.fb.constant.ConfigConst;
import com.ndp.fb.rdb.model.AppInfo;
import org.springframework.stereotype.Service;

import java.io.Serializable;

/**
 * Token接口
 *
 * @author rock
 */
@Service
public class TokenHelper implements Serializable {
    private String REDIRECTURI = ConfigCentre.getString(ConfigConst.WALLE_OAUTH_REDIRECTURI);

    public String getFacebookCode(AppInfo app){
        return "https://www.facebook.com/dialog/oauth?client_id=" + app.getAppId() + "&redirect_uri=" + REDIRECTURI + "&scope=email,ads_management,manage_pages,public_profile&state=connect|add_facebook_user_from_facebook_resources_tab&type=web_server";
    }


}
